﻿using AutoMapper;
using StarsAdmin.Core.DB.Entities;
using StarsAdmin.Core.Models;

namespace StarsAdmin.Application.Auth.Mappings
{
    public class AuthAutoMapperProFile : Profile
    {
        public AuthAutoMapperProFile()
        {
            CreateMap<UserEntity, CurrentUserDto>()
                .ForMember(dest => dest.RoleIdentifies, opt => opt.MapFrom(src => (from m in src.Roles select m.Identifying)));
        }
    }
}